'''
Created on 09/06/2014

@author: Hector
'''

class PFilter:
    '''
    classdocs
    '''
            
    def filterParameters(self, args):
            nextArg =0
            self.InPath=""
            self.OutPath=""
            self.bi=10000000
            self.bo=10000000
            self.sessionFile=""
            self.loadSession=False
            for arg in args:
                if arg=="-i" or arg=="--input-path" or arg=="--input-path=":
                    nextArg =1
                elif arg =="-o" or arg=="--output-path"or arg=="--output-path=":
                    nextArg = 2
                elif arg =="-bi" or arg=="--buffer-inputlines"or arg=="--buffer-inputlines=":
                    nextArg = 3
                elif arg =="-bo" or arg=="--buffer-outputlines"or arg=="--buffer-outputlines=":
                    nextArg = 4
                elif arg == "-l" or arg == "--load-session" or arg == "--load-session=":
                    nextArg = 5
                    self.loadSession=True
                else:
                    if nextArg==1:
                        self.InPath = arg
                    elif nextArg==2:
                        self.OutPath = arg
                    elif nextArg==3:
                        self.bi = int(arg)*1000000
                        print "bi ", self.bi
                    elif nextArg==4:
                        self.bo = int(arg)*1000000
                        print "bo ",self.bo
                    elif nextArg==5:
                        self.sessionFile=arg
                        self.loadSession=True
                        
 
    def getInputPath(self):
        return self.InPath
    def setInputPath(self, path):
        self.InPath= path
    def getOutputPath(self):
        return self.OutPath
    def setOutputPath(self, path):
        self.OutPath= path
    def getMegas(self):
        return self.megas
    def getBytes(self):
        return self.bytes
    def loadSession(self):
        return self.loadSession
    def getSessionFile(self):
        return self.sessionFile
    
                    